package com.swyc.osschat.Test.LambdaTest.Controller;

import java.math.BigDecimal;
import java.util.function.Supplier;

import com.swyc.osschat.Test.LambdaTest.Bean.Student;

/**
 * @author zhaol@yunrong.cn
 * @version V2.1
 * @since 2.1.0 2019/8/9 15:25
 */
public class SupplierTest {
    public static void main(String[] args) {
        Supplier<Integer> supplier = () -> Integer.valueOf(BigDecimal.TEN.toString());
        System.out.println(supplier.get());
        Supplier<Student> studentSupplier = ()->new Student("张三",18,177);
        studentSupplier = ()->new Student("李四",22,171);
        Student student = studentSupplier.get();
        System.out.println(Student.beanToString(student));
    }
}
